Atomic absorption spectroscopy
When white light, which consists of all colours (energies), is passed through a prism, a rainbow of colours is produced called a continuous spectrum, as shown below.

If the white light is first shone through an atomised sample of an element a spectrum with black lines is produced. This is called an absorption spectrum. An absorption spectrum is produced only if the energy of light can be absorbed by a valence electron and be promoted to a higher energy level.

As white light passes through the atomised sample, electrons absorb certain energies that allow them to jump to higher energy levels. The electrons later return to their original state and emit light in all directions. This produces black lines in the spectrum indicating the absence of certain energies that were absorbed by the electrons. Since atoms of different elements have electrons in different energy levels a unique absorption spectrum can be produced for each element. Absorption spectrums can therefore be used to identify the element present.

Since both emission and absorption spectra involve electrons absorbing energy and jumping to higher energy levels, a certain similarity between the two should be expected. Below are the absorption and emission spectra of copper. You can see that the coloured lines of the emission spectrum match with the dark lines of the absorption spectrum. This is to be expected as the electrons absorb the same energies to produce both spectra.

Continue